package service

import (
	"context"
	"cronjob_work/internal/model/entity"
)

type ITaskLogs interface {
	TaskLogAdd(ctx context.Context, logs *entity.PpTaskLog) (int64, error)
}

var localTaskLogs ITaskLogs

func TaskLogs() ITaskLogs {
	if localTaskLogs == nil {
		panic("implement not found for interface localTaskLogs, forgot register?")
	}

	return localTaskLogs
}

func RegisterTaskLogs(i ITaskLogs) {
	localTaskLogs = i
}
